package com.party.admin.task;

import com.party.admin.biz.cDataAnalysis.CDataAnalysisBizService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.*;

/**
 * @Description: 社群数据分析
 * @Author: hqh
 * @Date: 2020/11/09 15:45
 */
@Component(value = "QuartzCommunityDataAnalysis")
public class QuartzCommunityDataAnalysis {
    @Autowired
    private CDataAnalysisBizService cDataAnalysisBizService;

    private static Logger logger = LoggerFactory.getLogger(QuartzCommunityDataAnalysis.class);

    /**
     * 刷新分社数据
     * ---每小时 运行一次
     */
    public void refresh(){
        logger.info("开始____社群数据分析-数据维护");
        long staTime = System.currentTimeMillis();
        //总的
        cDataAnalysisBizService.countCDataAnalysisCount();
        //每一天
        cDataAnalysisBizService.countCDataAnalysisDetail(new ArrayList<>());
        long endTime = System.currentTimeMillis()-staTime;
        logger.info("社群数据分析-数据维护_____结束__"+"用时："+endTime);
    }
}
